package wechat.handler.bean.response.message.receive;

import org.dom4j.DocumentException;

import wechat.handler.bean.response.MessageBaseBean;

/**
 * 地理位置消息
 * 
 *
 */
public class ReceiveLocationBean extends MessageBaseBean {
	private String Location_X; // 纬度
	private String Location_Y; // 经度
	private String Scale;      // 地图缩放大小
	private String Label;      //地理位置信息
	
	public ReceiveLocationBean(String str) throws DocumentException {
		super(str);
		super.setMsgType(Receive_Message_Location);
	}
	
	public ReceiveLocationBean(){
		super.setMsgType(Receive_Message_Location);
	}

	public String getLocation_X() {
		return Location_X;
	}

	public void setLocation_X(String location_X) {
		Location_X = location_X;
	}

	public String getLocation_Y() {
		return Location_Y;
	}

	public void setLocation_Y(String location_Y) {
		Location_Y = location_Y;
	}

	public String getScale() {
		return Scale;
	}

	public void setScale(String scale) {
		Scale = scale;
	}

	public String getLabel() {
		return Label;
	}

	public void setLabel(String label) {
		Label = label;
	}

	protected static final String Xpath_Location_X = "/xml/Location_X";
	protected static final String Xpath_Location_Y = "/xml/Location_Y";
	protected static final String Xpath_Scale = "/xml/Scale";
	protected static final String Xpath_Label = "/xml/Label";
	
	public void transform() throws Exception {
		super.transform();
		this.setLocation_X(getNodeText(Xpath_Location_X));
		this.setLocation_Y(getNodeText(Xpath_Location_Y));
		this.setScale(getNodeText(Xpath_Scale));
		this.setLabel(getNodeText(Xpath_Label));
	}
	
	
//	public String buildXml() throws Exception {
//		super.buildXml();
//		super.addNode("Location_X", getLocation_X());
//		super.addNode("Location_Y", getLocation_Y());
//		super.addNode("Scale", getScale());
//		super.addNode("Label", getLabel());
//		return parent.asXML();
//	}


}
